#!/bin/bash

echo "🎮 启动PokerMind交互式测试客户端..."
echo "=========================================="
echo ""

# 检查参数
HOST=${1:-127.0.0.1}
PORT=${2:-8889}

echo "🔗 连接服务器: $HOST:$PORT"
echo ""

# 确定脚本所在目录（TCP模块目录）
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# 切换到项目根目录
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$PROJECT_ROOT"

echo "🚀 启动交互式客户端..."
echo ""

# 启动交互式客户端
mvn exec:java -pl pokermind-serv-dse-tcp \
  -Dexec.mainClass="com.pokermind.dse.tcp.client.interactive.InteractiveClient" \
  -Dexec.args="$HOST $PORT"
